I have one textbox and i want to enter a username in the Live Preview text box; the text below the text box changes instantly. Please give me a solution.
If We want to bind with text box in angular js then be use ng-bind directives.
Here, below we are using such bind in the program:
<script> angular.module('binduserName', []) .controller('myController', ['$scope', function ($scope) { $scope.username =username; }]); </script> <divng-controller="myController"> <label>Enter User name: <inputtype="text"ng-model="username"></label><br> Hello <spanng-bind="username"></span>! </div>
Output:
Here ,when we changed with another text ,it will display that text in the below of textbox.
Liked By
Write Answer
How to bind text box to the the text
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy
Join MindStick Community
You have need login or register for voting of answers or question.
Sachin Singh
03-Mar-2016Hi Anupam,
Output: